//
//  Text_Append.swift
//  Demo_01
//
//  Created by apple on 2020/7/21.
//  Copyright © 2020 Joseph. All rights reserved.
//

import SwiftUI

// 添加扩展方法+，对文本View进行拼接，实现富文本的艺术效果。
struct Text_Append: View {
    var body: some View {
        Text("Interactive ")
            .foregroundColor(.yellow)
            .fontWeight(.heavy)
        + Text("tutorials ")
            .foregroundColor(.orange)
            .strikethrough()
        + Text("for ")
            .foregroundColor(.red)
            .italic()
        + Text("SwiftUI")
            .foregroundColor(.purple)
            .underline()
    }
}

struct Text_Append_PreViews: PreviewProvider {
    static var previews: some View {
        Text_Append()
    }
}
